﻿using KAKA.Repository;
using Morus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KAKA.Domain
{
    public partial class Proof
    {
        public bool IsExpired()
        {
            var duration = IoC.Resolve<ISettingRepository>().GetByName(Setting.NAME_VERIFICATION_CODE_DURATION).Value;

            return this.CreateAt > DateTime.Now.AddSeconds(Convert.ToInt32(duration));
        }
    }
}
